<template>
  <div class="daily">
    <Head title="每日上新"></Head>
    <van-row :gutter="fontSize * 0.32">
      <van-col span="6" v-for="(shop, i) in 4" :key="i">
        <div class="wares">
          <div class="image">
            <img src="../image/swipe1.jpeg" />
          </div>
          <div class="van-ellipsis title">12387123912</div>
          <div class="price">
            <div class="unit">￥</div>
            <div>100</div>
          </div>
        </div>
      </van-col>
    </van-row>
  </div>
</template>

<script>
import { mapMutations, mapState } from "vuex";

export default {
  props: {
    shopList: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  computed: {
    ...mapState(["fontSize", "baseURL"]),
  },
  methods: {
    ...mapMutations(["setAddresinfo"]),
    /**
     * 去详情页面
     */
    toDetails(id) {
      this.setAddresinfo({});
      this.$router.push(`/details/${id}`);
    },
  },
};
</script>

<style lang='less' scoped>
.daily {
  margin-bottom: 0.6rem;
  padding: 0.64rem 0.48rem;
  background: rgba(255, 255, 255, 1);

  .wares {
    position: relative;
    text-align: center;

    .image {
      .fj(center);

      img {
        display: block;
        max-width: 100%;
        height: 3.12rem;
      }
    }

    .title {
      padding-top: 0.16rem;
      font-size: 0.52rem;
      line-height: 0.72rem;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(44, 42, 41, 1);
    }

    .price {
      padding-top: 0.16rem;
      font-size: 0.56rem;
      line-height: 0.56rem;
      font-family: STZhongsong;
      color: rgba(196, 66, 66, 1);
      .flex(center, flex-end);

      .unit {
        font-size: 0.48rem;
        line-height: 0.48rem;
      }
    }
  }
}
</style>
